package com.thoughtworks.triangle;

/**
 * Created by alisonps on 9/4/14.
 */
public class TriangleExercise {

    public void printOneAsterisk() {
        System.out.println("*");
    }

    public void printHorizontalLine(int n){
        for(int i = n; i > 0; i --) {
            System.out.print("*");
        }
    }

    public void printVerticalLine(int n){
        for(int i = n; i > 0; i --) {
            System.out.println("*");
        }
    }

    public void printRightTriangle(int n){
        for(int i = 1; i <= n; i ++ ) {
            printHorizontalLine(i);
            System.out.println("");
        }
    }
}
